package mall.demo.mybatis.pojo;

public class User {
	
	private int userId;
	private String loginName;
	private String password;
	private String nickname;
	private String email;
	private int is_delete;
	private int is_locked;
	
	public int getIs_delete() {
		return is_delete;
	}

	public void setIs_delete(int is_delete) {
		this.is_delete = is_delete;
	}

	public int getIs_locked() {
		return is_locked;
	}

	public void setIs_locked(int is_locked) {
		this.is_locked = is_locked;
	}

	public User() {
		
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickName) {
		this.nickname = nickName;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Override
	public String toString() {
		return "User [userId=" + userId + ", loginName=" + loginName
				+ ", password=" + password + ", nickname=" + nickname
				+ ", email=" + email + ", is_delete=" + is_delete
				+ ", is_locked=" + is_locked + "]";
	}

	public String getDisplayName() {
		if(this.nickname == null || "".equals(this.nickname.trim())) {
			return this.loginName;
		}
		return this.nickname;
	}
	
}
